package com.smedi.ismedi.notification.api.feign;

import com.smedi.ismedi.notification.api.dto.request.SendMailRequest;
import com.smedi.ismedi.web.starter.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @className: RemoteMailNotificationFeignApi
 * @Description: TODO
 * @version: v1.0.0
 * @author: wzx
 * @date: 2022/11/23 14:51
 */

@Api(tags = {"邮件发送接口"})
@FeignClient(name = "ismedi-notification")
@RequestMapping(value = "/api/v1/notification/mailSender")
public interface RemoteMailNotificationFeignApi {

    /**
     * 发送短信信息
     *
     * @param
     * @return
     */
    @ApiOperation(httpMethod = "POST", value = "异步发送短信信息")
    @RequestMapping(value = "/send/mail/one", method = RequestMethod.POST)
    ResponseData<Boolean> postSendShortMessage(@RequestBody SendMailRequest sendMailRequest);

    /**
     * 批量发送短信信息
     *
     * @param
     * @return
     */
    @ApiOperation(httpMethod = "POST", value = "异步发送短信信息")
    @RequestMapping(value = "/send/mail/batch", method = RequestMethod.POST)
    ResponseData<Boolean> postSendShortMessage(@RequestBody List<SendMailRequest> sendMailRequests);

}